package com.sky.mapper;

import com.sky.entity.User;
import com.sky.vo.UserLoginVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //新增用户，并获取用户id
    public void add(UserLoginVO userLoginVO);

   //根据openId查询用户
    @Select("select * from user where openid = #{openId}")
    public User find(String openId);

    //根据用户id查询用户
    @Select("select * from user where id = #{userId}")
    public User getById(Long userId);
}
